const ghpages = require('gh-pages');
const date = new Date();
const name = `deploy-${(date.getMonth()+1)<10?'0'+(date.getMonth()+1):(date.getMonth()+1)}${date.getDate()}${date.getHours()}${date.getMinutes()}`;
const branch = `master`;
ghpages.publish('dist', {
  branch: branch,
  dest: '',
  message: name,
},function(err) {
  if (!err){
    console.log('Published success!')
  }else{
    console.log(err)

  }
});
